Field
The exemplary embodiments of the invention generally relate to a method and apparatus for image compression and estimation. More particularly, the exemplary embodiments relate to a method and apparatus for estimating a quantization table for an image.
Description of the Related Art
With respect to image compression and estimation, methods of finding quantization tables for encoded images have been studied.
As an example of finding the quantization table, a paper written by S. Ye, Q. Sun, and E. C. Chang, titled “Detecting digital image forgeries by measuring inconsistencies of blocking artifact” published in IEEE International Conference of Multimedia and Expo (ICME), Beijing, China, 2007, pages 12˜15 (hereinafter referred to as [1]). The method of [1] uses a histogram of Discrete Cosine Transform (DCT) coefficients of the encoded image.
The histogram of DCT coefficients before image compression is in the continuous form, as shown in FIG. 1A. On the other hand, after quantization of DCT coefficients, a histogram as shown in FIG. 1B has large values at DCT coefficient values which correspond to integer multiples of a quantization step size Q (e.g., ±Q, ±2Q, ±3Q, . . . ) and has small values at DCT coefficient values between the integer multiples because of clipping errors in the course of making brightness values, after quantization, to have 8 bits (0˜255). Using these characteristics, the method of [1] suggested a method of estimating a quantization table, as shown in FIG. 2A.
In the method of estimating a quantization table of FIG. 2A, 64 DCT coefficients are obtained by performing 8×8 block-based DCT in step 201 and a histogram is obtained for the 64 DCT coefficients in step 203. Power spectrum of the histogram is obtained through a Fourier transform, in step 205. Peaks having magnitudes more than a certain value are detected from a second-order differential graph of the power spectrum and the number of the detected peaks is counted, in step 207. The number of the peaks becomes a quantization step size for a corresponding DCT coefficient, and after completing such peak detection for all the 64 DCT coefficients, an 8×8 sized quantization table may be estimated.
FIG. 2B represents the histogram obtained in step 203, FIG. 2C represents the power spectrum obtained in step 205, and FIG. 2D represents the peaks detected from the second-order differential graph in step 207.
As another example of finding the quantization table, a paper written by Z. Fan, R. L. de Queiroz, titled “Identification of bitmap compression history: JPEG detection and quantizer estimation” publicized in IEEE Transaction of Image Process., vol. 12, no. 2, pages 230˜235, 2003 (hereinafter referred to as [2]). The method of [2] also estimates a quantization table based on a histogram of the DCT coefficient values in an encoded image. Specifically, in the method of [2], the envelope of a direct current (DC) histogram is modeled with Gaussian distribution and the envelop of a remaining alternating current (AC) histogram is modeled with a Laplacian distribution (likely hood function). In the method of [2], in case of obtaining histogram values at integer multiples of a quantization step size, the maximum likely hood estimation (MLE) technique is applied to estimate the quantization step size where the DC histogram has to conform to the Gaussian distribution and the AC histogram has to conform to the Laplacian distribution.
Known methods of estimating a quantization table suggested how to obtain a quantization table to be used for a still image e.g., in a Joint Photographic Experts Group (JPEG) format.
Thus, the known methods assume to perform quantization on a number of blocks that constitute an image using a single quantization table and estimate the single quantization table that has been used in image compression using information relating to all blocks of the image (e.g., a histogram of DCT coefficients).
However, in encoding a video image in e.g., a Moving Picture Experts Group (MPEG) format, since a different quantization table is used for each block that constitutes the video image, the known method cannot be applied. Furthermore, existing methods of estimating a quantization table are rarely applied to video image encoding, because quantization needs to be performed on a residual block, which represents a difference between an image block constituting the current frame and an image block constituting the previous frame.